<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/order.js"></script>
<script language="javascript">
	function changFBAgoodsnos(shopid,goodsn)
	{
		 $.post("/order/ajaxbutton", {"op": "changFBAgoodsno", "olddata": goodsn,"val":goodsn,"id":shopid},
		  function (data) {
			  
		 }, "json");
	}
</script>
<title>FBA订单信息</title>

<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent">
<div class="pageheader notab">
  <h1 class="pagetitle"> FBA订单信息</h1>
  <div class="menulist">
    <ul class="profile_summary">
    </ul>
  </div>
</div>
<!--pageheader-->

<div id="contentwrapper" class="contentwrapper">
<div id="basicform" class="subcontent">
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th colspan="2" class="head1">基础信息</th>
      </tr>
    </thead>
  </table>
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <tbody>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">订单号</td>
        <td class="head0" bgcolor="#FFFFFF">{{$detail.tradeid}}</td>
        <td class="head0" bgcolor="#FFFFFF">交易号</td>
        <td class="head1" bgcolor="#FFFFFF">{{$detail.tradeid}}</td>
      </tr>
      <tr>
        <td class="head1" width="120" bgcolor="#FFFFFF">来源店铺</td>
        <td class="head0" bgcolor="#FFFFFF">{{$detail.shopname}}</td>
        <td class="head0" width="120" bgcolor="#FFFFFF">订单状态</td>
        <td class="head1" bgcolor="#FFFFFF">{{if $detail.status==1}} 正常订单{{/if}}
        {{if $detail.status==2}} 待审查订单{{/if}}
        {{if $detail.status==3}} 退款订单{{/if}}
        </td>
      </tr>
    
      <tr>
        <td class="head1" bgcolor="#FFFFFF">国家:</td>
        <td class="head0" bgcolor="#FFFFFF">{{$detail.custcountry}}  &nbsp;({{$detail.country_cn}})</td>
        <td class="head0" width="120" bgcolor="#FFFFFF">货币</td>
        <td class="head1" bgcolor="#FFFFFF">
        {{if $detail.moneytype == '请选择' || $detail.moneytype==''}}
        <select name="moneytype" id="moneytypes" required  onBlur="showmonetytype()" required >
            <option value="">请选择</option>
          {{foreach item=li from=$moneyratelist key=key}}
          <option value="{{$li.name}}" {{if $detail.moneytype==$li.name}} selected{{/if}}>{{$li.name}}</option>
          {{/foreach}}
          </select>
        {{else}}
        {{$detail.moneytype}}
        {{/if}}
        </td>
      </tr>
        <tr>
        <td class="head1" bgcolor="#FFFFFF">买家帐号:</td>
        <td class="head0" bgcolor="#FFFFFF" colspan="3">{{$detail.custid}}</td>
       
      </tr>
      <tr>
        <td class="head1" bgcolor="#FFFFFF">客户信息
</td>
        <td class="head0" colspan="3" bgcolor="#FFFFFF"><div style="border:0px #000 solid;width:100%;background:#fff;"> <span style="margin-left: 10px;margin-top:5px;">Name：</span> <span style="margin-left:54px;">
          {{$detail.custname}}
            </span><br>
            {{if $detail.custaddress1}}
            <span style="margin-left: 10px">Address：</span> <span style="margin-left:38px;">
            {{$detail.custaddress1}}
            </span>
            
            {{/if}}
            {{if $detail.custaddress2}}
            <br>
            <span style="margin-left: 10px">Address2：</span> <span style="margin-left:26px;">
           {{$detail.custaddress2}}
            </span>
            {{/if}}
           
            <br>
            <span style="margin-left: 10px">City：</span><span style="margin-left:66px;">
           {{$detail.custcity}}
            </span><br>
            <span style="margin-left: 10px">State：</span><span style="margin-left:57px;">
          {{$detail.custprovince}}
            </span><br>
            <span style="margin-left: 10px">Country：</span><span style="margin-left:40px;">
       {{$detail.custcountry}}
            
        
            
            </span><br>
            <span style="margin-left: 10px">Post code：</span><span style="margin-left:27px;">
            {{$detail.custzipcode}}
            </span><br>
           </td>
      </tr>
     
     
    </tbody>
  </table>
  <br>
 

  
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable" width="100%">
    <thead>
      <tr>
        <th class="head1"><div style="float:left">订单报表</div><div style="text-align:right"> 
        
        无退款计算：总收入-成本(商品成本+FBA费用+头程费用）  &nbsp;&nbsp;&nbsp;&nbsp;有退款计算：总收入-退款-FBA费用</div></th>
      </tr>
    </thead>
  </table>
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th class="head1">结账信息</th>
        <th class="head1">结算汇率</th>
        <th class="head1">商品收入</th>
        <th class="head1 right">运费收入</th>
        <th class="head1 right">商品成本</th>
        <th class="head1 right">FBA费用</th>
         <th class="head1 right">退款</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td valign="middle">收款货币({{$detail.moneytype}})</td>
        <td>{{$detail.moneytype}} {{$detail.moneyrate}}</td>
        <td >{{$detail.moneytype}} {{$detail.origintotle}}</td>
        <td >{{$detail.moneytype}} {{$detail.originexpressask}}</td>
        <td >RMB {{$detail.totalcostprice}}</td>
        <td >RMB {{$detail.payship_fee}}</td>
         <td >{{$detail.moneytype}} {{$detail.refundMoney}}</td>
      </tr>
      <tr>
        <td valign="middle">结算人民币(RMB)</td>
        <td>RMB {{$detail.moneyrate}}</td>
        <td>RMB {{$detail.goods_amount}}</td>
        <td >RMB {{$detail.shipping_fee}}</td>
        <td >RMB {{$detail.totalcostprice}}</td>
        <td >RMB {{$detail.payship_fee}}</td>
        <td >RMB {{$detail.refundMoneyRMB}}</td>
      </tr>
    <tfoot>
      <tr>
        <th class="head1"></th>
        <th class="head1"></th>
        <th class="head1"></th>
        <th class="head1 right">&nbsp;</th>
        <th class="head1 right">总计收入 {{$detail.totalgoods_amount}}</th>
        <th class="head1 right">成本 {{$detail.allcostprice}} </th>
        <th class="head1 right"> 毛利 {{$detail.profits}} </th>
      </tr>
    </tfoot>
    </tbody>
    
  </table>
  <br>
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th class="head1"><div style="float:left">订单详情</div></th>
      </tr>
    </thead>
  </table>
  <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
    <thead>
      <tr>
        <th class="head1">序号</th>
        <th class="head0">图片</th>
        <th class="head1" width="30%">商品编号</th>
        <th class="head1 right">数量</th>
        <th class="head0 right">销售价</th>
        <th class="head1 right">总售价</th>
        <th class="head0 right">成本</th>
        <th class="head0 right">头程费用</th>
      </tr>
    </thead>
  
    
    {{foreach from=$goodslist item=li key=key}}
    <tr>
      <td valign="middle" style="position:relative;"><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.rec_id}}"></td>
      <td valign="middle" style="position:relative;">{{if $li.local_url}} <a href="/{{$li.local_url}}" target="_blank"><img src="{{$li.thumb_url}}" height="60"></a>{{else}}<img src="{{$li.thumb_url}}" height="60">{{/if}}
      </td>
      <td>{{$li.productname}}<br>
       {{if $li.goods_id==0}}
         <font color="#6666FF">{{$li.productid}}</font> <br>
       {{else}}
        <a href="/product/showproduct?sku={{$li.productid}}" target="_blank"><font color="#6666FF">{{$li.productid}}</font></a> <br>
       {{/if}}
       
        
        {{if $li.goods_id==0 && !$li.bgoods_id}}
         <span  style="cursor:pointer" onClick="listTable.edit(this, 'changFBAgoodsno','{{$detail.shopid}}','{{$li.productid}}')"><font color="#FF0000">修正销售SKU</font></span>
      
        {{/if}}
        
          {{if $li.goods_id==0 && $li.bgoods_id>0}}
        
      
       <span  style="cursor:pointer" onClick="changFBAgoodsnos('{{$detail.shopid}}','{{$li.productid}}')"><font color="#FF0000">修正销售SKU</font></span>
        {{/if}}
        
        
      
         </td>
    
      <td >{{$li.ordernum}}</td>
      <td >{{$li.goods_amount}}</td>
      <td >{{$li.goods_amount}}</td>
      <td >
      {{if $li.goods_id}}
      	
        	{{$li.onecostprice}}
      
      {{else}}
        	0.00
      {{/if}}
      
      </td>
      <td >(RMB){{$li.deliverprice}}</td>
    
    </tr>
    {{/foreach}}
         
     
    
  </table>
   
   
			
  <br>

  


</tbody>
</table>

</div></div>



</body>
</html>